<?php 
		$sql = "select distinct category from `".TABLE_PREFIX."apps` order by id desc";
		$query = $this->DatabaseHandler->Query($sql);
		$app_cate = array();
		while ($row = $query->GetRow()){
			$app_cate[] = base64_encode($row['category']);
			$sqls = "select * from `".TABLE_PREFIX."apps` where category='".$row['category']."' order by ID desc limit 12";
			$q = $this->DatabaseHandler->Query($sqls);
			while ($rows = $q->GetRow()){
				$cateapps[base64_encode($row['category'])][] = $rows; //分类下的app
			}
		}//获取分类名称


?>	<div class="app_left">
		<div class="app_nav app_nav_bottom">
        <ul>
		<?php if( $_GET['code'] != "cate" ) {$on = "on "; }else{ $on = "" ;}?>
		<li class="<?php echo $on."icon_01"; ?>"><a href="index.php?mod=app">应用首页</a></li>
	<?php 
		$x=0;
		foreach($app_cate as $cate){ 
		$x++;
		if( $_GET['id'] == $cate ){ $on = "on ";}else{ $on=""; }
		if( $x == count($app_cate) ){ $last = " nob"; }else{ $last=""; } ?>
          <li class="<?php echo $on."icon_0".($x+1).$last; ?>"><a href="index.php?mod=app&code=cate&id=<?php echo $cate;?>"><?php echo base64_decode($cate);?></a></li>
	<?php }//end foreach ?>
                
        </ul>
        </div>
        <div class="app_nav">
        	<ul>我的应用(2)
          	<li class="icon_06"><a href="###">网上订货</a></li>
         	<li class="icon_07 nob"><a href="###">客户订单查询</a></li>
          	</ul>
        </div>
	</div>